package STUDENT.TRANBANGTUNG.day05_23_2016.ex9simple;

public class Model {
	public int[] tinhdiem(Object obj) {
		int diem[] = new int[obj.getArResult().length];
		String[][] cautraloi = obj.getArAnswer();
		String[] dapan = obj.getArRightAnswer();
		for (int i = 0; i < cautraloi.length; i++) {
			int diem1 = 0;
			for (int j = 0; j < cautraloi[i].length; j++) {
				if (cautraloi[i][j].equals(dapan[j])) {
					diem1++;
					diem[i] = diem1;
				}	
			}
		}
		return diem;
	}
}
